package com.webcamtracker.image.color.rgb;

import com.webcamtracker.image.Color;

import java.awt.image.BufferedImage;


public class RGBNColorSampler implements ColorSampler {
    public Color getColorAt(BufferedImage image, int x, int y) {
        int rgb = image.getRGB(x, y);
        return new NormRGBColor(rgb);
    }

    public Color getColorFrom(RGBColor color) {
        return new NormRGBColor(color.getRed(), color.getGreen(), color.getBlue());
    }
}
